@extends('layouts.index')
@section('title','活动')
    @section('content')
        <div class="main-container">
            <div>
                <section class="related-cases span14" id="related-cases">
                    <div class="related-cases__fill span2 hide-mobile"></div>
                    <div class="related-cases__top span12 span14-mobile">
                        <a class="button button--dark active-tab-forecast" style="float: left;">@lang('web.activity_notices')</a>
                        <a class="button button--light active-tab" style="float: left;">@lang('web.activity_end')</a>

                    </div>
                    <div class="active-forecast">
                    <!--活动预告部分-->
                    <ul class="related-cases__case-holder span12 span14-mobile " id="load_more">


                    </ul>

                        <a href="javascript:void(0)" onclick="load_more()" class="related-cases__load-more span8 span100p-mobile pixel-pattern"><span class="span2 span4-mobile related-cases__load-more__arrow-holder"><span class="related-cases__load-more__arrow"></span></span>
                            <!-- react-text: 7373 -->
                            <font style="vertical-align: inherit;">
                                <font style="vertical-align: inherit;" id="load">@lang('web.load_more')</font>
                            </font>
                            <!-- /react-text -->
                        </a>
                    </div>
                    <div class="active-failure" style="display: none">
                    <!--过往活动部分-->
                    <ul class="related-cases__case-holder span12 span14-mobile " id="load_more1">

                    </ul>
                        <a href="javascript:void(0)" onclick="load_more1()" class="related-cases__load-more span8 span100p-mobile pixel-pattern"><span class="span2 span4-mobile related-cases__load-more__arrow-holder"><span class="related-cases__load-more__arrow"></span></span>
                            <!-- react-text: 7373 -->
                            <font style="vertical-align: inherit;">
                                <font style="vertical-align: inherit;" id="load1">@lang('web.load_more')</font>
                            </font>
                            <!-- /react-text -->
                        </a>
                    </div>
                </section>

            </div>
            <div class="cf"></div>
        </div>
        <script>
            var page1=1;
            var page2=2;
            function load_more(){
                $.get('{{route('activity.get_more')}}',{page:page1++,type:1},function(data){
                    if(data){
                        $("#load_more").html($("#load_more").html()+data);
                    }else{
                        $("#load").html('@lang('web.no_more')');
                    }
                });

            }
            function load_more1(){
                $.get('{{route('activity.get_more')}}',{page:page2++,type:2},function(data){
                    if(data){
                        $("#load_more1").html($("#load_more1").html()+data);
                    }else{
                        $("#load1").html('@lang('web.no_more')');
                    }
                });
            }
        load_more();
         load_more1();


        </script>
        @endsection